﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class TestUtility_TestUrlDecodeEncode : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void BtnEncode_Click(object sender, EventArgs e)
    {
        //编码
        AfterUrlEncode.Text = HttpUtility.UrlEncode(BeforeUrlEncode.Text);
        //解码
        AfterUrlDecode.Text =  HttpUtility.UrlDecode(BeforeUrlDecode.Text);
    }
}